// let fs = require('fs');
// fs.writeFile('./file/one.txt',"窗前明月光",(err)=>{
//     if(err){
//         console.log('第一句写入失败')
//     }else{
//         fs.writeFile('./file/two.txt',"疑是地上霜",(errs)=>{
//             if(errs){
//                 console.log('第二句写入失败')
//             }else{

//             }
//         })
//     }
// })
let {writeFun} = require("./writeFun");
let {readFun} = require("./readFun")
// let wirteTangshi = async ()=>{
//      let res = await writeFun('./file/one.txt',"窗前明月光");
//      console.log(res)
//      let res1 = await writeFun("./file/two.txt","疑是地上霜");
//      console.log(res1)
//      let res2 = await writeFun('./file/three.txt',"举头望明月");
//      console.log(res2)
//      let res4 = await writeFun("./file/four.txt","低头思故乡");
//      console.log(res4)
// }

// wirteTangshi();
let readTangshi = async ()=>{
    let data = await readFun("./file/one.txt");
    console.log(data);
    let data1 = await readFun("./file/two.txt");
    console.log(data1);
    let data2 = await readFun("./file/three.txt");
    console.log(data2)
    let data3 = await readFun('./file/four.txt');
    console.log(data3)
}

readTangshi();